const {Query}=require('../db/qurey')

// 用户注册
module.exports.setLogin = async (user_name, user_password, user_mobile) => {
    return await Query(`INSERT  INTO user (user_id,user_name, user_password, user_mobile) 
    VALUES ("${user_mobile}","${user_name}", "${user_password}" , "${user_mobile}");`)
}
// 用户查询
module.exports.loginBy = async (user_mobile) => {
    return await Query(`SELECT * FROM user WHERE user_mobile='${user_mobile}';`)
}
// 用户登录
module.exports.loginTo = async (user_name, user_password) => {
    return await Query(`SELECT * FROM user WHERE user_name='${user_name}' and user_password='${user_password}';`)
}
